<template>
  <component :is="componentIcon as any" v-if="componentIcon" />
</template>

<script lang="ts" setup>
import { ImportComment } from '@typings/comment'

const props = defineProps<{
  is?: ImportComment
}>()

const componentIcon = ref<Comment>()
onMounted(() => {
  if (props.is) {
    props.is.then((e) => {
      componentIcon.value = markRaw(e.default)
    })
  }
})

</script>

<style lang="scss" scoped>
</style>
